#!/bin/bash
set -u
set -e

backup(){
        if [ -e "$1.bak" ];then
                cp "$1.bak" "$1"
        else
                cp "$1" "$1.bak"
        fi
}

# https://github.com/521xueweihan/GitHub520

backup /etc/hosts

curl -fsSL https://raw.hellogithub.com/hosts >> /etc/hosts
